﻿using Ross.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Ross.BSCSystem.Controllers
{
    [SimpleAuthenticationFilter]
    public class FileDownLoadController : Controller
    {
        // GET: FileDownLoad
        public ActionResult Index()
        {
            return View();
        }

        [System.Web.Http.HttpGet]
        public FileResult ExportExcel_Co( string name = "", string ver = "")
        {
            using (BSCReports_DpService serv = new BSCReports_DpService("TranDbContext"))
            {
                return serv.ExportExcel_Co(ver);
            }

        }
        [System.Web.Http.HttpGet]
        public FileResult ExportExcel_Dp(string name, string ver = "")
        {
            using (BSCReports_DPService serv = new BSCReports_DPService("TranDbContext"))
            {
                return serv.ExportExcel_Dp(ver, name);
            }

        }

        [System.Web.Http.HttpGet]
        public FileResult ExportExcel_Mo(string name, string month = "", string week = "", string department = "", string Responsible = "")
        {
            using (MonthlyPlanService serv = new MonthlyPlanService("TranDbContext"))
            {
                return serv.ExportExcel_Mo(name,month, week, department, Responsible);
            }

        }
    }
}